<template>
    <div id="searchHeader">
        <div class="logo">
            <img src="../assets/logo.png" alt="">
        </div>
        <div class="searchBox">
            <el-input type="text" placeholder="搜索商品" class="inputBox">
                <i class="el-icon-search" slot="prepend"></i>
                <el-button type="primary" slot="append">搜索</el-button>
            </el-input>
            
        </div>

        <div class="myCart">
            <span class="cartText">
                我的购物车
            </span>
            <span class="cartCount">{{ $store.state.goodCount }}</span>
        </div>
    </div>
</template>

<script>
export default {
    name: 'SearchBar',
    data() {
        return {};
    },
    props: {},

    components: {},

    created() {},

    mounted() {},

    methods: {},

    computed: {},

    watch: {},

    directives: {},

    filters: {}
};
</script>

<style scoped >
* {
    margin: 0;
}
#searchHeader{
    /* margin: 29px; */
    width: 1200px;
	height: 115px;
	margin: 29px auto 0;
    /* background-color: pink; */
    position: relative;
}

/* 设置el-button的颜色 */
.el-button--primary{
    background-color: #37ab40;
    color: white;
}

.logo{
	width:150px;
	height:59px;
    /* margin-left: 11%; */
	margin:29px 0 0 17px;
    /* background-color: pink; */
    position: absolute;
}

/* 搜索框 */
.searchBox{
	width:616px;
	height:38px;
	/* border:1px solid #37ab40; */
	margin:34px 0 0 0;
    padding: 0;
    position: absolute;
    left: 292px;
	/* background:url(../assets/icons.png) 10px -338px no-repeat; */
}
.searchBox input{
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 1em;
}

.inputBox{
    margin:2;
    padding:0;
    border:1px solid #37ab40;
    /* border-radius: 2%; */
    /* background-color: #37ab40; */
}

.myCart{
    position: absolute;
    right: 3%;
    /* top: 40%; */
    margin:0;
    padding:0;

    width:200px;
	height:40px;
	margin-top:35px;
    /* background-color: lightblue; */
    text-align: center;
    line-height: 40px;
}

.cartText{
    width:158px;
	height:38px;
	line-height:38px;
	border:1px solid #dddddd;
	display:inline-block;
	background:url(../assets/icons.png) 13px -300px no-repeat;
	font-size:14px;
	color:#37ab40;
	text-indent:30px;
}

.cartCount{
    display: inline-block;
    margin:0;
    padding:0;
    border: 0;
    width: 40px;
	height: 40px;
	text-align: center;
	line-height: 37.5px;
	font-size: 18px;
	font-weight: bold;
	color: #fff;
	background-color: #ff8800;
}

</style>
